<!DOCTYPE html>
<html>
<!-- 履职职责落实情况管理 -->

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

</head>

<body>
    <div id="app" class="popupW100" v-cloak>
        <el-form label-position="right" :model="Form" status-icon :rules="rules" ref="ruleForm" label-width="100px"
            size="mini">
            <el-row>
                <el-row>
                    <el-col :span="11">
                        <div class="elst-select-mini">
                            <el-form-item>
                                <el-input type="text" v-model="Form.dutyName" autocomplete="off" size="mini">
                                    <template slot="prepend">
                                        {{DutiesAndResponsibilities.dutyName+mark.m}}
                                    </template>
                                </el-input>
                            </el-form-item>
                        </div>
                    </el-col>
                    <el-col :span="11" :offset="2">
                        <div class="elst-select-mini">
                            <el-form-item>
                                <el-input type="text" v-model="Form.dutyMine" autocomplete="off" size="mini">
                                    <template slot="prepend">
                                        {{DutiesAndResponsibilities.dutyMine+mark.m}}
                                    </template>
                                </el-input>
                            </el-form-item>
                        </div>
                    </el-col>
                    <el-col :span="11">
                        <div class="elst-select-mini">
                            <el-form-item>
                                <el-input size="mini">
                                    <template slot="prepend">
                                        <div> {{DutiesAndResponsibilities.situation+mark.m}}</div>
                                    </template>
                                    <el-select @visible-change="visibleChange" v-model="Form.situation" slot="suffix" :placeholder="DutiesAndResponsibilities.situation">
                                        <el-option label="请选择" value=""></el-option>
                                        <el-option v-for="item in situation" :label="item.value" :value="item.value">
                                        </el-option>
                                    </el-select>
                                </el-input>
                            </el-form-item>
                        </div>
                    </el-col>
                    <el-col :span="11" offset="2">
                        <el-form-item>
                            <div class="elst-select-mini" style="margin-left:-100px">
                                <el-input size="mini">
                                    <template slot="prepend">
                                        {{DutiesAndResponsibilities.date+mark.m}}
                                    </template>
                                    <el-date-picker slot="suffix" v-model="Form.date" type="date" size="mini"
                                        format="yyyy-MM-dd" value-format="yyyy-MM-dd"
                                        placeholder="选择时间">
                                    </el-date-picker>
                                </el-input>
                            </div>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-col :span="24">
                    <el-form-item :label="DutiesAndResponsibilities.evaluation+mark.m" prop="evaluation"
                        class="inputTextarea">
                        <el-input type="textarea" v-model="Form.evaluation" autocomplete="off"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="11">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input type="text" v-model="Form.score" autocomplete="off" size="mini">
                                <template slot="prepend">
                                    {{DutiesAndResponsibilities.score+mark.m}}
                                </template>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
                <el-col :span="9" :offset="2">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input type="text" v-model="Form.name" autocomplete="off" size="mini" :disabled="true">
                                <template slot="prepend">
                                    {{user.name+mark.m}}
                                </template>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
                <el-col :span="2">
                    <el-button @click=UserInput() class="ml10">{{col.Choose}}</el-button>
                </el-col>


                <el-col :span="24">
                    <el-form-item :label="user.remarks+mark.m" prop="remarks" class="inputTextarea">
                        <el-input type="textarea" v-model="Form.remarks" autocomplete="off"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row type="flex" justify="end">
                <el-form-item>
                    <el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnSave}}</el-button>
                    <el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnCommit}}</el-button>
                    <el-button type="primary" @click="parent.ListItem.dialogVisible=false">{{col.btnBack}}</el-button>
                </el-form-item>
            </el-row>
        </el-form>
        <el-dialog title="履职职责落实情况管理" :visible.sync="ListItem.dialogVisible" @close='closeDialog' width="80%"
            height="80%" top="10vh">
            <iframe ref="iframe" :src="ListItem.InputUrl" style="height:95%;width:100%" frameborder="0"></iframe>
        </el-dialog>
    </div>
    <script type="text/javascript">
        var app = new Vue({
            el: '#app',
            data: {
                //表单内容
                ListItem: ListItem,
                situation:[],
                //获取下拉菜单situation
                situation: [],
                formInline: {
                    model: { name: '' },
                    offset: 0,
                    limit: 10
                },
                id: '',
                //获取下拉菜单situation
                situation: [],
                value1: '',
                //业务表单内容
                Form: {
                    id: guidEmpty,
                    dutyName: '',
                    dutyMine: '',
                    situation: '',
                    date: '',
                    evaluation: '',
                    score: '',
                    name: '',
                    remarks: '',
                },
                //表单验证
                rules: {
                    dutyName: [
                        verification.NotNull,
                    ],
                    dutyMine: [
                        verification.NotNull,
                    ],
                    situation: [
                        // verification.NotNullSelect
                    ],

                    date: [
                        verification.NotNull,
                    ],
                    evaluation: [
                        verification.NotNull,
                    ],
                    score: [
                        // verification.NotNull,
                    ],
                    name: [
                        // verification.NotNull,
                    ],
                    remarks: [
                        // verification.NotNull,
                    ],

                }

            },

            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                //提交数据
                onSubmitForm: function (formName) {
                    var mythis = this;
                    this.$refs[formName].validate(function (valid) {
                        //验证通过
                        if (valid) {

                            onSubmitForm(this, '/api/DutiesAndResponsibilities/Save', mythis.Form);
                        } else {
                            //验证失败

                            return false;
                        }
                    });

                },

                getData: function () {
                    getData(this, '/api/DutiesAndResponsibilities/get?id=' + this.id);
                    this.Form.situation = this.Form.situation + "";
                },
                //Dialog展示
                UserInput: function (val, id) { DialogShow(this, val, "DutiesAndResponsibilitiesInputPerson.html", id); },
            },
            mounted: function () {
                this.id = getUrlParam("id");
                this.getData();
                //获取下拉菜单内容
                this.situation = getDicData('n54');
                //初始化数据
                this.GetPageData(1);
                //列表高度自适应
                tablehigh(this);
            },

        });
    </script>
</body>

</html>